﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SD.TeachSystem.EntityFrameworkCore.Model
{
    [Table("SystemLogMes")]
    public class SystemLogMes
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        public Guid Id { get; set; }= Guid.NewGuid();
        /// <summary>
        /// 方法名称
        /// </summary>
        public string MethodName {  get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string Title {  get; set; }
        /// <summary>
        /// 日志等级
        /// </summary>
        public LogLevel LogLevel {  get; set; }
        /// <summary>
        /// 日志信息
        /// </summary>
        public string Message {  get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateDate { get; set; }= DateTime.Now;
    }

    public enum LogLevel
    {
        // 0 信息
        Info,
        // 1 警告
        Warning,  
        // 2 错误
        Error
    }
    
}
